<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();
const goBig20 = () => {
  window.open('http://101.42.108.39:90/big20/', '_self')
}
</script>

<template>
  <div class="home">
    <h1>政治在线答题系统</h1>
    <br />
    <ul>
      <li>
        <el-button type="primary" @click="router.push('/answer')">练习模式</el-button>
      </li>
      <li>
        <el-button type="primary" @click="router.push('/exam')">在线考试</el-button>
      </li>
      <li>
        <el-button type="primary" @click="router.push('/errorAnswer')">刷错题</el-button>
      </li>
      <li>
        <el-button type="primary" @click="goBig20">二十大题目练习</el-button>
      </li>
      <li>
        <el-button type="primary" @click="router.push('/admin')">数据管理</el-button>
      </li>
    </ul>
  </div>
</template>

<style lang="less" scoped>
li {
  list-style: none;
  margin: 20px;
}

.home {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  text-align: center;
}
</style>
